package com.xuebusi.toutiao.admin.api.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xuebusi.toutiao.admin.api.common.result.ApiResult;
import com.xuebusi.toutiao.admin.api.user.entity.CollectEntity;
import com.xuebusi.toutiao.admin.api.user.vo.CollectRVO;
import org.springframework.http.ResponseEntity;

public interface CollectService extends IService<CollectEntity> {
    /**
     * 收藏资源
     *
     * @param collectEntity
     * @return
     */
    ResponseEntity<ApiResult<CollectRVO>> collect(CollectEntity collectEntity);

    /**
     * 取消收藏
     *
     * @param userId   用户id
     * @param sourceId 资源id
     * @param type     资源类型
     * @return
     */
    ResponseEntity<ApiResult<CollectRVO>> cancel(Integer userId, Integer sourceId, int type);
}
